package cn.exrick.xboot.base.entity

import cn.exrick.xboot.core.base.XbootBaseEntity
import cn.exrick.xboot.core.base.XbootBaseEntityKt
import cn.exrick.xboot.core.common.constant.CommonConstant
import cn.exrick.xboot.core.common.utils.SnowFlakeUtil
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import java.util.*
import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

/**
 * @author Fei
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "en_enterprise_user_check")
@TableName("en_enterprise_user_check")
@ApiModel(value = "企业审核")
data class EnterpriseUserCheck(

        @ApiModelProperty("企业id")
        var enterpriseUserId: String? = null,

        @ApiModelProperty("企业区域id")
        var areaId: String? = null,

        @ApiModelProperty("审核时间")
        var checkTime: Date? = null,

        @ApiModelProperty("审核人")
        var checkUser: String? = "",

        @ApiModelProperty("审核状态")
        var checkStatus: Int? = CommonConstant.PRE_CHECK,

        @ApiModelProperty("审核原因")
        @Column(length = 500)
        var checkReason: String? = ""

) : XbootBaseEntityKt() {

    @Id
    @TableId
    override var id: String = SnowFlakeUtil.nextId().toString()


    companion object {
        const val serialVersionUID = 1L
    }
}